import urllib
from bs4 import BeautifulSoup
responseFile = urllib.urlopen("http://www.baidu.com")
responseText = responseFile.read()
soup = BeautifulSoup(responseText)
titleTag = soup.title
print titleTag
